Repository navigation
One command for anything (minefield <url|files|symptom>), honest exit codes, uvx msmf, Claude Code plugin - #242
Draft
Blackwellboy wants to merge 5 commits into
Draft
Blackwellboy wants to merge 5 commits into
Blackwellboy wants to merge 5 commits into
Conversation
…codes, uvx msmf - A URL (http(s):// or host:port) and/or existing paths route to diagnose in lite mode (<=5 live requests); plain words still go to guide, and a bare word is never a path. - diagnose exits 3 and says 'Could not reach URL: nothing was tested live' when the endpoint is unreachable (it exited 0 with a no-candidates message). Opt-in --fail-on-problem exits 1 on a live PROBLEM, for CI. - MINEFIELD_API_KEY is read when --api-key is absent (OPENAI_API_KEY is not). - minefield --version works. - msmf alias 0.1.1 ships an msmf executable so 'uvx msmf ...' works. - MCP setup leads with a zero-install uvx config for any client. - .gitignore ignores *.egg-info (an editable install creates one). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01P2NVAwhVxZZGB3jqJBvcP9
claude plugin validate . passes; a real install into an empty config loads the skill and the MCP server reports Connected. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01P2NVAwhVxZZGB3jqJBvcP9
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01P2NVAwhVxZZGB3jqJBvcP9
…r name for detect-secrets Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01P2NVAwhVxZZGB3jqJBvcP9
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01P2NVAwhVxZZGB3jqJBvcP9
Owner
Author
|
CI status on this PR:
Generated by Claude Code |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a CLI, packaging and docs change, not a trap entry, so the trap-entry items in the checklist do not apply. The items that cover every diff:
HOST:PORT; tests use loopback fixtures only)git pushon a maintainer machine and never in CI, so a green badge here says nothing about themWhat this PR adds:
One command that takes whatever the user has, honest exit codes when nothing could be tested, and installs that work in any harness with nothing to set up first. Found by installing
msmf0.2.2 from PyPI into a clean environment and driving every command against the repo's own fixture lane.Problems found
uvx msmffails.uvxandpipx runlook for an executable named like the package, andmsmfships onlyminefieldandminefield-mcp:An executable named 'msmf' is not provided by package 'msmf'.minefield diagnose --base-url http://HOST:9/v1(a typo in the port) exits 0 and prints "No canonical trap rose to the candidate list". Nothing says the server was never reached.--api-key), where it lands in shell history andps.minefield --versionis parsed asguide --versionand fails with a usage error.quick, which is the full Doctor (34 requests on the fixture lane), not the 5-request lite check the menu calls "quick".What changes
minefield <anything>: a URL (http(s)://orhost:port) and/or files that exist and look like paths route todiagnosein lite mode (at most 5 requests), with leftover words as the symptom. Plain words still go toguide, and a bare word is never a path, sominefield logs are emptybehaves as before even when./logsexists. In a terminal the routed command is printed to stderr.diagnoseexits 3 and says "Could not reach URL: nothing was tested live" (with what to check) when the endpoint is unreachable. Opt-in--fail-on-problemexits 1 on a live PROBLEM. File and symptom leads never change the exit code, matching the GitHub Action doc's "never fails the build". The codes match hermes-minefield's (1 FAIL, 2 bad input/blocked, 3 UNKNOWN).MINEFIELD_API_KEYis read when--api-keyis absent.OPENAI_API_KEYis deliberately not read: that would send a cloud key to whatever local URL was typed.minefield --versionprints the version and trap count.msmfalias 0.1.1 adds anmsmfexecutable (needs publishing to take effect)..claude-plugin/makes the repo a Claude Code plugin marketplace:claude plugin install minefield@model-serving-minefieldinstalls the existing skill plus the MCP server run throughuvx.claude plugin validate .passes, and a real install into an empty config loads the skill and reports the server Connected.uvx --from model-serving-minefield minefield-mcpconfig for any client..gitignoreignores*.egg-info/. An editable install creates one, and 0.2.3 prep: traps 169-175, a short README, ExLlamaV3 page, one install name, Pages builder #241 currently commitsmodel_serving_minefield.egg-info/by accident.Checks run
make test: all four suites OK, including 10 new tests intests/test_one_command.py(routing, word-vs-path, unreachable exits 3,--fail-on-problem1 on a broken lane and 0 on a clean one, env key never printed).make verify-generated: clean after regeneratingdist/(the agent pack zip includes the docs).integrity/run_checks.py: everything PASS exceptpublic surfaces, which fails locally by design without the Pages-site peer.Secret-scan note
The first commit's new test used a made-up key (
mf-test-key-...). Bothgitleaksanddetect-secretsflagged it as a generic API key. a1e8a84 switches the test to the allowlistedsk-SENTINELprefix and marks the env-var name with# pragma: allowlist secret. Run on that commit, both scanners come back clean locally.gitleaksscans every commit in the PR, so this PR's check stays red until the history is gone. A squash merge clears it, because only the final tree lands onmain. I did not force-push a squashed branch myself.Overlap with open PRs
#241 rewrites the README into
TRAPS.mdanddocs/GUIDE.md. This PR's README edit is a few lines in the install section, so whichever merges second needs a small rebase there. No overlap in code.Generated by Claude Code